<!-- BEGIN REGISTRATION FORM -->
<form class="register-form" action="/registro" method="post" <% if flash[:notice] %>style="display:none;"<% end %>>
	<h3>Nuevo Usuario</h3>

	<% if flash[:alert] %>
		<div class="alert alert-danger">
			<button class="close" data-close="alert"></button>
			<span><%= flash[:alert] %></span>
		</div>
	<% end %>

	<div class="form-group">
		<label class="control-label visible-ie8 visible-ie9">Nombre Completo</label>
		<div class="input-icon">
			<i class="fa fa-font"></i>
			<input class="form-control placeholder-no-fix" type="text" placeholder="Nombre Completo" name="nombre"/>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label visible-ie8 visible-ie9">Usuario</label>
		<div class="input-icon">
			<i class="fa fa-user"></i>
			<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Usuario" name="username"/>
		</div>
	</div>
	<div class="form-group">
		<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
		<label class="control-label visible-ie8 visible-ie9">Email</label>
		<div class="input-icon">
			<i class="fa fa-envelope"></i>
			<input class="form-control placeholder-no-fix" type="text" placeholder="Email" name="email"/>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label visible-ie8 visible-ie9">Clave</label>
		<div class="input-icon">
			<i class="fa fa-lock"></i>
			<input class="form-control placeholder-no-fix" type="password" autocomplete="off" id="register_password" placeholder="Clave" name="password"/>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label visible-ie8 visible-ie9">Confirmá tu Clave</label>
		<div class="controls">
			<div class="input-icon">
				<i class="fa fa-check"></i>
				<input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="Confirmá tu Clave" name="password_confirmation"/>
			</div>
		</div>
	</div>

	<input type="hidden" value="<%= form_authenticity_token() %>" name="authenticity_token"/>

	<div class="form-actions">
		<button id="register-back-btn" type="button" class="btn" onClick="window.location.href = '/login'">
		<i class="m-icon-swapleft"></i> Volver </button>
		<button type="submit" id="register-submit-btn" class="btn blue pull-right">
		<img src="/assets/img/loaderblue.gif" style="display:none;">Enviar <i class="m-icon-swapright m-icon-white"></i>
		</button>
	</div>
</form>
<!-- END REGISTRATION FORM -->

<% if flash[:notice] %>
<!-- REGISTRO EXITOSO -->
<div id="registro_exitoso">
	<div class="alert alert-success">
		<strong><%= flash[:notice] %></strong>
	</div>
	<button class="btn green btn-block" onClick="window.location.href = '/login'">Ingresar</button>
</div>
<!-- END REGISTRO EXITOSO -->
<% end %>

<% content_for :scripts do %>
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="/assets/scripts/core/app.js" type="text/javascript"></script>
	<script src="/assets/scripts/custom/registrousuario.js" type="text/javascript"></script>
	<!-- END PAGE LEVEL SCRIPTS -->
  <script>
		jQuery(document).ready(function() {
		  App.init();
		  RegistroUsuario.init();
		});
	</script>
<% end %>